<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>会员中心 - 钓鱼小程序</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        /* 移动端滚动条优化 - 隐藏滚动条 */
        ::-webkit-scrollbar {
            display: none;
        }
        
        * {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f5f7fa;
            padding-bottom: 60px;
            padding-top: 50px;
            color: #333;
            line-height: 1.6;
            max-width: 375px;
            margin: 0 auto;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .header {
            position: fixed;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 375px;
            background: #3498DB;
            color: white;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            z-index: 100;
            justify-content: space-between;
        }

        .back-btn {
            background: none;
            border: none;
            color: white;
            font-size: 18px;
            cursor: pointer;
        }

        .header h1 {
            font-size: 18px;
            font-weight: 600;
            flex: 1;
            text-align: center;
        }

        .main-content {
            flex: 1;
            padding: 20px;
        }

        .current-status {
            background: rgba(255,255,255,0.95);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 20px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }

        .status-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #ffd700, #ffb347);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            margin: 0 auto 12px;
        }

        .status-title {
            font-size: 18px;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .status-desc {
            font-size: 14px;
            color: #666;
            margin-bottom: 16px;
        }

        .status-progress {
            background: #f0f0f0;
            border-radius: 10px;
            height: 8px;
            margin-bottom: 8px;
            overflow: hidden;
        }

        .progress-bar {
            background: linear-gradient(90deg, #ffd700, #ffb347);
            height: 100%;
            width: 65%;
            border-radius: 10px;
        }

        .progress-text {
            font-size: 12px;
            color: #666;
        }

        .membership-plans {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-bottom: 20px;
        }

        .plan-card {
            background: rgba(255,255,255,0.95);
            border-radius: 16px;
            padding: 20px;
            position: relative;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
        }

        .plan-card.selected {
            border-color: #3498DB;
            box-shadow: 0 4px 20px rgba(52,152,219,0.3);
        }

        .plan-card.recommended {
            border-color: #ff6b6b;
            box-shadow: 0 4px 20px rgba(255,107,107,0.3);
        }

        .plan-badge {
            position: absolute;
            top: -8px;
            right: 20px;
            background: #ff6b6b;
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .plan-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
        }

        .plan-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
        }

        .silver-icon {
            background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
        }

        .gold-icon {
            background: linear-gradient(135deg, #ffd700, #ffb347);
        }

        .diamond-icon {
            background: linear-gradient(135deg, #b9f2ff, #87ceeb);
        }

        .plan-info {
            flex: 1;
        }

        .plan-name {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .plan-desc {
            font-size: 12px;
            color: #666;
        }

        .plan-price {
            text-align: right;
        }

        .price-current {
            font-size: 20px;
            font-weight: 700;
            color: #e74c3c;
        }

        .price-original {
            font-size: 14px;
            color: #999;
            text-decoration: line-through;
            margin-left: 4px;
        }

        .price-period {
            font-size: 12px;
            color: #666;
        }

        .plan-benefits {
            margin-top: 16px;
        }

        .benefits-title {
            font-size: 14px;
            font-weight: 500;
            color: #333;
            margin-bottom: 8px;
        }

        .benefits-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .benefit-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            color: #666;
        }

        .benefit-icon {
            color: #27ae60;
            font-size: 12px;
        }

        .duration-selector {
            background: rgba(255,255,255,0.95);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .selector-title {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 12px;
        }

        .duration-options {
            display: flex;
            gap: 8px;
        }

        .duration-option {
            flex: 1;
            padding: 12px 8px;
            border: 1px solid #ddd;
            border-radius: 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            background: white;
        }

        .duration-option.selected {
            border-color: #3498DB;
            background: #f8fbff;
            color: #3498DB;
        }

        .duration-text {
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 2px;
        }

        .duration-discount {
            font-size: 11px;
            color: #e74c3c;
        }

        .purchase-summary {
            background: rgba(255,255,255,0.95);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .summary-title {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 12px;
        }

        .summary-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 14px;
        }

        .summary-item:last-child {
            margin-bottom: 0;
            padding-top: 8px;
            border-top: 1px solid #f0f0f0;
            font-weight: 600;
            color: #e74c3c;
        }

        .summary-label {
            color: #666;
        }

        .summary-value {
            color: #333;
        }

        .purchase-btn {
            width: 100%;
            background: linear-gradient(135deg, #3498DB, #2980B9);
            color: white;
            border: none;
            border-radius: 12px;
            padding: 16px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            margin-bottom: 20px;
            box-shadow: 0 4px 12px rgba(52,152,219,0.3);
        }

        .purchase-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(52,152,219,0.4);
        }

        .terms {
            background: rgba(255,255,255,0.95);
            border-radius: 12px;
            padding: 16px;
            font-size: 12px;
            color: #666;
            line-height: 1.5;
        }

        .terms-title {
            font-weight: 600;
            margin-bottom: 8px;
        }

        .radio-btn {
            width: 18px;
            height: 18px;
            border: 2px solid #ddd;
            border-radius: 50%;
            position: relative;
            margin-left: auto;
        }

        .plan-card.selected .radio-btn {
            border-color: #3498DB;
        }

        .plan-card.selected .radio-btn::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 10px;
            height: 10px;
            background: #3498DB;
            border-radius: 50%;
        }

        /* 小程序胶囊按钮 */
        .capsule-btn {
            background: rgba(255,255,255,0.2);
            border-radius: 16px;
            padding: 6px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .capsule-btn .dot {
            width: 4px;
            height: 4px;
            background: white;
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div class="header">
        <button class="back-btn">←</button>
        <h1>会员中心</h1>
        <div class="capsule-btn">
            <div class="dot"></div>
            <div class="dot"></div>
            <div class="dot"></div>
        </div>
    </div>

    <div class="main-content">
        <div class="current-status">
            <div class="status-icon">🥇</div>
            <div class="status-title">黄金会员</div>
            <div class="status-desc">距离钻石会员还差350积分</div>
            <div class="status-progress">
                <div class="progress-bar"></div>
            </div>
            <div class="progress-text">650 / 1000 积分</div>
        </div>

        <div class="membership-plans">
            <div class="plan-card" onclick="selectPlan(this, 'silver')">
                <div class="plan-header">
                    <div class="plan-icon silver-icon">🥈</div>
                    <div class="plan-info">
                        <div class="plan-name">白银会员</div>
                        <div class="plan-desc">基础权益，适合新手</div>
                    </div>
                    <div class="plan-price">
                        <div class="price-current">¥19</div>
                        <div class="price-period">/月</div>
                    </div>
                    <div class="radio-btn"></div>
                </div>
                <div class="plan-benefits">
                    <div class="benefits-title">会员权益</div>
                    <div class="benefits-list">
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>入场券9.5折优惠</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>渔具商城9折优惠</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>专属客服支持</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>每月2张优惠券</span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="plan-card recommended selected" onclick="selectPlan(this, 'gold')">
                <div class="plan-badge">推荐</div>
                <div class="plan-header">
                    <div class="plan-icon gold-icon">🥇</div>
                    <div class="plan-info">
                        <div class="plan-name">黄金会员</div>
                        <div class="plan-desc">性价比之选，热门推荐</div>
                    </div>
                    <div class="plan-price">
                        <div class="price-current">¥39</div>
                        <div class="price-original">¥58</div>
                        <div class="price-period">/月</div>
                    </div>
                    <div class="radio-btn"></div>
                </div>
                <div class="plan-benefits">
                    <div class="benefits-title">会员权益</div>
                    <div class="benefits-list">
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>入场券8.5折优惠</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>渔具商城8折优惠</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>优先预订热门钓场</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>每月5张优惠券</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>专属钓鱼技巧指导</span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="plan-card" onclick="selectPlan(this, 'diamond')">
                <div class="plan-header">
                    <div class="plan-icon diamond-icon">💎</div>
                    <div class="plan-info">
                        <div class="plan-name">钻石会员</div>
                        <div class="plan-desc">尊享特权，至尊体验</div>
                    </div>
                    <div class="plan-price">
                        <div class="price-current">¥99</div>
                        <div class="price-original">¥158</div>
                        <div class="price-period">/月</div>
                    </div>
                    <div class="radio-btn"></div>
                </div>
                <div class="plan-benefits">
                    <div class="benefits-title">会员权益</div>
                    <div class="benefits-list">
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>入场券7折优惠</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>渔具商城7折优惠</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>VIP钓位免费使用</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>每月10张优惠券</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>专业钓鱼教练指导</span>
                        </div>
                        <div class="benefit-item">
                            <span class="benefit-icon">✓</span>
                            <span>免费钓具租借服务</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="duration-selector">
            <div class="selector-title">选择时长</div>
            <div class="duration-options">
                <div class="duration-option" onclick="selectDuration(this, 1)">
                    <div class="duration-text">1个月</div>
                </div>
                <div class="duration-option selected" onclick="selectDuration(this, 3)">
                    <div class="duration-text">3个月</div>
                    <div class="duration-discount">9折优惠</div>
                </div>
                <div class="duration-option" onclick="selectDuration(this, 12)">
                    <div class="duration-text">12个月</div>
                    <div class="duration-discount">7折优惠</div>
                </div>
            </div>
        </div>

        <div class="purchase-summary">
            <div class="summary-title">订单明细</div>
            <div class="summary-item">
                <span class="summary-label">会员类型</span>
                <span class="summary-value">黄金会员</span>
            </div>
            <div class="summary-item">
                <span class="summary-label">购买时长</span>
                <span class="summary-value">3个月</span>
            </div>
            <div class="summary-item">
                <span class="summary-label">原价</span>
                <span class="summary-value">¥117.00</span>
            </div>
            <div class="summary-item">
                <span class="summary-label">优惠</span>
                <span class="summary-value">-¥12.00</span>
            </div>
            <div class="summary-item">
                <span class="summary-label">实付金额</span>
                <span class="summary-value">¥105.00</span>
            </div>
        </div>

        <button class="purchase-btn">立即开通会员</button>

        <div class="terms">
            <div class="terms-title">服务条款</div>
            <div>
                1. 会员权益自开通之日起生效，到期后自动失效<br>
                2. 会员期间享受的优惠不可与其他活动叠加使用<br>
                3. 会员服务一经开通，不支持退款<br>
                4. 最终解释权归钓鱼小程序所有
            </div>
        </div>
    </div>

    <script>
        let selectedPlan = 'gold';
        let selectedDuration = 3;

        function selectPlan(element, planType) {
            // 移除所有选中状态
            document.querySelectorAll('.plan-card').forEach(card => {
                card.classList.remove('selected');
            });
            
            // 添加选中状态
            element.classList.add('selected');
            selectedPlan = planType;
            
            updateSummary();
        }

        function selectDuration(element, duration) {
            // 移除所有选中状态
            document.querySelectorAll('.duration-option').forEach(option => {
                option.classList.remove('selected');
            });
            
            // 添加选中状态
            element.classList.add('selected');
            selectedDuration = duration;
            
            updateSummary();
        }

        function updateSummary() {
            const plans = {
                silver: { name: '白银会员', price: 19 },
                gold: { name: '黄金会员', price: 39 },
                diamond: { name: '钻石会员', price: 99 }
            };

            const discounts = {
                1: 1.0,
                3: 0.9,
                12: 0.7
            };

            const plan = plans[selectedPlan];
            const originalPrice = plan.price * selectedDuration;
            const discount = discounts[selectedDuration];
            const finalPrice = Math.round(originalPrice * discount);
            const savings = originalPrice - finalPrice;

            // 更新摘要
            document.querySelector('.summary-item:nth-child(2) .summary-value').textContent = plan.name;
            document.querySelector('.summary-item:nth-child(3) .summary-value').textContent = `${selectedDuration}个月`;
            document.querySelector('.summary-item:nth-child(4) .summary-value').textContent = `¥${originalPrice}.00`;
            document.querySelector('.summary-item:nth-child(5) .summary-value').textContent = `-¥${savings}.00`;
            document.querySelector('.summary-item:nth-child(6) .summary-value').textContent = `¥${finalPrice}.00`;
        }

        // 初始化
        updateSummary();
    </script>
</body>
</html> 